<%-- 
    Document   : ContentListView
    Created on : Apr 26, 2010, 8:49:57 PM
    Author     : vasi
--%>
<%@page import="java.util.*" %>
<%@page import="entities.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>View content list</title>
    </head>
    <body>
        <h1>Content list view</h1>
        <%
            List<ContentEntity> contentList = (List)request.getAttribute("contentList");
            Iterator<ContentEntity> contentListIt = contentList.iterator();
            out.println("<div>");
            while (contentListIt.hasNext()){
                ContentEntity content = contentListIt.next();
                out.println("<div>");
                    out.println("<h3><a href=\""+request.getContextPath()+"/content/view?cid="+content.getCid()+"\">"+content.getTitle()+"</a></h3>");
                    out.println("<p>"+content.getBody()+"</p>");
                out.println("</div>");
            }
            out.println("</div>");
        %>
    </body>
</html>
